module.exports = async (args, db, ctx) => {
	switch (args.tip) {
		//返回所有权限
		case 'getRoles':
			return await db.collection("uni-id-roles").field({
				role_name: true,
				role_id: true
			}).get();
			break;
			//返回用户权限
		case 'getmyRoles':
			// return await db.collection('uni-id-users').field({
			// 	role: true,
			// 	username: true
			// }) get();
			return await db.collection("uni-id-users").field({
				role: true,
				username: true
			}).get();
			break;
	}
}